
#include "zos_config.h"


#ifdef BOARD_USING_SLEEP
#include  "zos.h"

zos_uint32_t rtc_num =0;
void rtc_cb(void *parameter)
{
	rtc_num = 10;
	zos_printf("enter rtc callback  %d\r\n",rtc_num);

}


/**
 * @brief 任务线程
 */
int demo_sleep(int argc, char *argv[])
{
	zos_printf("enter sleep %d\r\n",rtc_num);
	//定时60S唤醒
	zos_rtc_timer_create(ZOS_RTC_TIMER_ID_1,60,rtc_cb,ZOS_NULL);
	//告知基站这是最后一条消息，发送完断开基站连接
	nb_send_rai();
	//开启深睡眠
	nb_work_unlock();
	//由于即将进入深睡眠，所以采用大延时让出任务控制权
	zos_task_delay(10000);
	return ZOS_EOK;
}

#include "shell.h"

SHELL_EXPORT_CMD(demo_sleep,demo_sleep, sleep demo);


#endif 
